package com.sz.virtualbank.web.vo.bankcard;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 添加银行卡请求对象
 *
 * @author Claude
 */
@Data
@ApiModel("添加银行卡请求")
public class BankCardAddReqVO {

    @ApiModelProperty(value = "卡号", required = true)
    @NotBlank(message = "卡号不能为空")
    @Pattern(regexp = "^\\d{16,19}$", message = "卡号格式不正确")
    private String cardNumber;

    @ApiModelProperty(value = "卡类型(1:储蓄卡,2:信用卡)", required = true)
    @NotNull(message = "卡类型不能为空")
    private Integer cardType;

    @ApiModelProperty(value = "银行名称", required = true)
    @NotBlank(message = "银行名称不能为空")
    private String bankName;

    @ApiModelProperty(value = "持卡人姓名", required = true)
    @NotBlank(message = "持卡人姓名不能为空")
    private String cardholderName;

    @ApiModelProperty(value = "有效期(信用卡)")
    @Pattern(regexp = "^(0[1-9]|1[0-2])/\\d{2}$", message = "有效期格式不正确(MM/YY)")
    private String expireDate;

    @ApiModelProperty(value = "安全码(信用卡)")
    @Pattern(regexp = "^\\d{3,4}$", message = "安全码格式不正确(3-4位数字)")
    private String cvv;

    @ApiModelProperty(value = "绑定手机号", required = true)
    @NotBlank(message = "绑定手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String bindPhone;

    @ApiModelProperty(value = "是否默认(0:非默认,1:默认)")
    private Integer isDefault = 0;
}
